//
//  YKApproveDetailItemCell.m
//  YunKang
//
//  Created by leoking870 on 2017/10/4.
//  Copyright © 2017年 leoking870. All rights reserved.
//

#import "YKApproveDetailItemCell.h"
#import "YKDashView.h"
@interface YKApproveDetailItemCell ()
@property (weak, nonatomic) IBOutlet UILabel *numberLabel;
@property (weak, nonatomic) IBOutlet UILabel *drugNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *drugNumberLabel;
@property (weak, nonatomic) IBOutlet UILabel *drugPriceLabel;
@end


@implementation YKApproveDetailItemCell
@dynamic tableViewItem;
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)cellLoadSubViews {
    [super cellLoadSubViews];
    self.numberLabel.tf_weight = 1;
    self.drugNameLabel.tf_weight = 4;
    self.drugNumberLabel.tf_weight = 2;
    self.drugPriceLabel.tf_weight = 2;
    self.numberLabel.textAlignment = NSTextAlignmentLeft;
    self.drugNumberLabel.textAlignment = NSTextAlignmentCenter;
    self.drugPriceLabel.textAlignment = NSTextAlignmentCenter;
    self.numberLabel.textAlignment = NSTextAlignmentCenter;
    [@[self.numberLabel, self.drugNameLabel,  self.drugNumberLabel,self.drugPriceLabel] mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.top.equalTo(self.contentView.mas_top).offset(11);
    }];
    
    [@[self.numberLabel, self.drugNameLabel,  self.drugNumberLabel,self.drugPriceLabel] mas_alignWeightlyAlongAxis:MASAxisTypeHorizontal
                                                                                                           fixedSpace:@2
                                                                                                            leadingTo:self.contentView.mas_leading
                                                                                                            leadSpace:13
                                                                                                           trailingTo:self.contentView.mas_trailing
                                                                                                            tailSpace:13];
    
    YKDashView* dashView = [[YKDashView alloc]init];
    dashView.lineWidth = .5f;
    dashView.lineColor = [UIColor tf_colorWithHexString:@"#d4d4d4"];
    dashView.dashLineLength = 3;
    [self addSubview:dashView];
    [dashView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.bottom.trailing.equalTo(self);
        make.height.mas_equalTo(1);
    }];
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
